package com.dux.shiro1.domin;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.List;

/**
 * Title: User <br>
 * Description: User <br>
 * Date: 2018年10月22日
 *
 * @author 王东旭
 * @version 1.0.0
 * @since jdk8
 */

@Entity
public class User {

    @Id
    private Long id;
    private String username;
    private String passwordHash;
    private String salt;
    private String phone;
    private String mail;

    public User() {
    }

    public User(Long id, String username, String passwordHash, String salt, String phone, String mail) {
        this.id = id;
        this.username = username;
        this.passwordHash = passwordHash;
        this.salt = salt;
        this.phone = phone;
        this.mail = mail;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPasswordHash() {
        return passwordHash;
    }

    public void setPasswordHash(String passwordHash) {
        this.passwordHash = passwordHash;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", passwordHash='" + passwordHash + '\'' +
                ", salt='" + salt + '\'' +
                ", phone='" + phone + '\'' +
                ", mail='" + mail + '\'' +
                '}';
    }
}
